<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>The source code</title>
  <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
  <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
  <style type="text/css">
    .highlight { display: block; background-color: #ddd; }
  </style>
  <script type="text/javascript">
    function highlight() {
      document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
    }
  </script>
</head>
<body onload="prettyPrint(); highlight();">
  <pre class="prettyprint lang-js"><span id='global-property-'>/**
</span> * @ignore
 * Tabs render.
 * @author yiminghe@gmail.com
 */
KISSY.add(&quot;tabs/render&quot;, function (S, Container) {

    var CLS = &quot;top bottom left right&quot;;

    return Container.getDefaultRender().extend({

        beforeCreateDom: function (renderData) {
            renderData.elCls
                .push(this.getBaseCssClass(this.control.get('barOrientation')))
        },

        decorateDom: function () {
            var control = this.control;
            control.get('bar').set('changeType', control.get('changeType'));
        },

        '_onSetBarOrientation': function (v) {
            var self = this,
                el = self.$el;
            el.removeClass(self.getBaseCssClass(CLS))
                .addClass(self.getBaseCssClass(v));
        }

    }, {
        name:'TabsRender',
        HTML_PARSER: {
            barOrientation: function (el) {
                var orientation = el[0].className.match(/(top|bottom|left|right)\b/);
                return orientation &amp;&amp; orientation[1] || &quot;top&quot;;
            }
        }
    });
}, {
    requires: ['component/container']
});</pre>
</body>
</html>
